Skip to content

Update error state views to use dynamic titles#1632

Merged
DRadmir merged 1 commit intomainfrom
chart-scene-updates
Jan 27, 2026
Merged

Update error state views to use dynamic titles#1632
DRadmir merged 1 commit intomainfrom
chart-scene-updates

Conversation

@DRadmir
Copy link
Contributor

@DRadmir DRadmir commented Jan 26, 2026

Replaces static error titles with dynamic error descriptions in StateEmptyView for ChartScene, PerpetualScene, and ChartStateView. Also removes an unused presentationDetents modifier in ChartScene.

Replaces static error titles with dynamic error descriptions in StateEmptyView for ChartScene, PerpetualScene, and ChartStateView. Also removes an unused presentationDetents modifier in ChartScene.
@DRadmir DRadmir requested a review from gemdev111 January 26, 2026 06:32
@DRadmir DRadmir self-assigned this Jan 26, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @DRadmir, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience by making error messages more descriptive and context-aware across several key views, including ChartScene, PerpetualScene, and ChartStateView. Additionally, it includes a minor cleanup by removing an unnecessary UI modifier, contributing to a leaner codebase.

Highlights

  • Dynamic Error Titles: Error state views in ChartScene, PerpetualScene, and ChartStateView now display dynamic error descriptions instead of a generic "Error Occurred" title, providing more context to the user.
  • UI Cleanup: An unused presentationDetentsForCurrentDeviceSize modifier has been removed from ChartScene, streamlining the UI code.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request successfully updates the error state views to use dynamic titles, aligning with the stated goal of replacing static error titles with dynamic error descriptions. Additionally, it includes a beneficial cleanup by removing an unused presentationDetents modifier in ChartScene. While the change makes the error title dynamic, consider maintaining a consistent pattern where a concise, generic title is used for error states, with specific details provided in the description. This approach generally enhances user experience by offering a clear, scannable title alongside comprehensive error information.

StateEmptyView(
title: Localized.Errors.errorOccured,
description: error.networkOrNoDataDescription,
title: error.networkOrNoDataDescription,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While moving error.networkOrNoDataDescription to the title parameter makes the title dynamic, it's generally better practice to use a concise, generic title for error states (e.g., 'An error occurred!') and provide the specific details in the description parameter. This improves readability and user experience, especially if networkOrNoDataDescription can be verbose. The StateEmptyView is designed to accommodate both a title and a description.

Suggested change
title: error.networkOrNoDataDescription,
title: Localized.Errors.errorOccured,
description: error.networkOrNoDataDescription,

StateEmptyView(
title: Localized.Errors.errorOccured,
description: error.networkOrNoDataDescription,
title: error.networkOrNoDataDescription,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the change in PerpetualScene.swift, using error.networkOrNoDataDescription directly as the title might make the title too long or less user-friendly. It's recommended to keep a generic error title and use the description parameter for the specific error details provided by error.networkOrNoDataDescription. This maintains a consistent and clear error presentation.

Suggested change
title: error.networkOrNoDataDescription,
title: Localized.Errors.errorOccured,
description: error.networkOrNoDataDescription,

@DRadmir DRadmir merged commit 39b29bc into main Jan 27, 2026
2 checks passed
@DRadmir DRadmir deleted the chart-scene-updates branch January 27, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants